<%@page import="cn.edu.hust.sse.software7.class3.entities.EBAdmin"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<div style="background-color: activeborder;">
<%
	EBAdmin admin = (EBAdmin) session.getAttribute("admin2Update");
	if (null != admin) {
%>
<form action="/admin?method=updateadmin" method="post">
<table>
	<tr>
		<td style="background-color: silver;"><b>ID</b></td>
		<td><%=admin.getAdId()%><input type="hidden" name="adminId"
			value="<%=admin.getAdId()%>"></td>
	</tr>
	<tr>
		<td style="background-color: silver;"><b>管理员名称</b></td>
		<td><%=admin.getAdName()%></td>
	</tr>
	<tr>
		<td style="background-color: silver;"><b>密码</b></td>
		<td><input type="password" name="passwd"></td>
	</tr>
	<tr>
		<td style="background-color: silver;"><b>新密码</b></td>
		<td><input type="password" name="newpasswd"></td>
	</tr>
	<tr>
		<td style="background-color: silver;"><b>重复密码</b></td>
		<td><input type="password" name="repasswd"></td>
	</tr>
	<tr>
		<td style="background-color: silver;"><b>激活</b></td>
		<td><input type="checkbox" name="active"
			<%if (admin.isEnable()) {%> checked="checked" <%}%> /></td>
	</tr>
	<tr>
		<td style="background-color: silver;"><b>描述</b></td>
		<td><textarea name="description" rows="3" cols="50"><%=admin.getDescription()%></textarea></td>
	</tr>
	<tr>
		<td><input type="reset" value="重置" /></td>
		<td><input type="submit" value=" 修改" /></td>
	</tr>
</table>
</form>
<%
	} else {
%>
!nothing to udpate!
<%
	}
%>
<%
	if (null != session.getAttribute("updateMessage")) {
%>
<%=session.getAttribute("updateMessage")%>
<%
	}
%>
</div>
</body>
</html>